package dancrawler.proto.cmd;

import java.util.HashMap;

/**
 *
 */
public class CmdHandlerRegister {
    private HashMap<Short, CmdHandler> handlers = new HashMap<>();

    public CmdHandlerRegister() {
    }

    public void setHandler(short id, CmdHandler handler)
    {
        handlers.put(id, handler);
    }
    
    public CmdHandler lookupHandler(short id)
    {
        return handlers.get(id);
    }
}
